import React, { ComponentType, Suspense } from 'react';

import { Spin } from 'antd';

const lazyComp = (Comp: ComponentType): React.ReactNode => {
	return (
		<Suspense fallback={<Spin size="small" />}>
			<Comp />
		</Suspense>
	);
};

export default lazyComp;
